package com.atguigu.tingshu.user.service;

import com.atguigu.tingshu.model.user.UserPaidTrack;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.HashSet;

/**
 * @author sun
 */
public interface UserPaidTrackService extends IService<UserPaidTrack> {

    /**
     * 判断用户是否购买了专辑
     * @param albumId 专辑id
     * @return 是否购买
     */
    Boolean isPaidAlbum(Long albumId);

    /**
     * 获取用户已购的音频id
     * @param albumId 专辑id
     * @param userId 用户id
     * @return 用户已购的音频id
     */
    HashSet<Long> getPaidTrackIds(Long albumId, Long userId);
}
